#ifndef _XCOM_H
#define _XCOM_H

#include "sys.h"
#include "device.h"

#define XCOM_ADDR               (0x01)
#define XCOM_FRAME              (0xFE)

typedef struct
{
    uint8_t disk;
    uint32_t addr;
    char name[16];
    uint32_t length;
    uint32_t seek;
}XCOM_FILE;

typedef  uint8_t (*xcom_cb)(XCOM_FILE* file, uint8_t *data, uint16_t datalen);

extern void xcom_init(void *dev);
extern uint32_t xcom_receive(XCOM_FILE* file, xcom_cb callback);

#endif

